package com.genexususa.eo.bing.test.pause;

import com.genexususa.eo.bing.connection.CampaignManager;
import com.genexususa.eo.bing.test.TestUtil;

public class ConsumePauseCampaigns {
    public static void main(String[] args) {
        TestUtil testUtil = new TestUtil();
        String campaignsXML =   "<Bing_CampaignCollection>\n" +
                                    "\t<Campaign xmlns=\"https://adcenter.microsoft.com/v8\">\n" +
                                        "\t\t<GxCampaignId>15611534</GxCampaignId>\n" +
                                        "\t\t<BingCampaignId>" + testUtil.campaignId1 + "</BingCampaignId>\n" +
                                        "\t\t<Status>" + testUtil.campaignStatus.get("paused") + "</Status>\n" +
                                    "\t</Campaign>\n" +
                                    "\t<Campaign xmlns=\"https://adcenter.microsoft.com/v8\">\n" +
                                        "\t\t<GxCampaignId>5298495</GxCampaignId>\n" +
                                        "\t\t<BingCampaignId>" + testUtil.campaignId2 + "</BingCampaignId>\n" +
                                        "\t\t<Status>" + testUtil.campaignStatus.get("paused") + "</Status>\n" +
                                    "\t</Campaign>\n" +
                                "</Bing_CampaignCollection>\n";
        CampaignManager resource = new CampaignManager();
        System.out.println("Consuming PauseCampaigns.....");
        String userName = testUtil.userName;
        String password = testUtil.password;
        String developerToken = testUtil.developerToken;
        long customerId = testUtil.customerId;
        long customerAccountId = testUtil.customerAccountId;
        String applicationId = testUtil.applicationId;
        long accountId = testUtil.accountId1;
        //String result = resource.pauseCampaigns(userName, password, developerToken, customerId, customerAccountId, applicationId, accountId, campaignsXML);
        String result = resource.updateCampaigns(customerAccountId, campaignsXML);
        System.out.println("Result:\n" + result);
    }
}
